import java.io.*;
import java.util.Arrays;
import java.util.Collections;
import java.text.Normalizer;

class FrequencyAnalyzer {
	protected BufferedReader input;

	public FrequencyAnalyzer(String inFile) throws FileNotFoundException {
		input = new AccRemover(inFile);
	}

	protected FrequencyResult[] compute() throws IOException {
		int c, id, raw[] = new int[52];
		while ((c = input.read()) != -1) {
			if (c>='a' && c<='z')
				id = 26+c-'a';
			else if (c>='A' && c<='Z')
				id = 0+c-'A';
			else
				id = -1;
			if (id != -1)
				raw[id]++;
		}
		FrequencyResult[] res = new FrequencyResult[26];
		for (int i=0; i<26; i++)
			res[i] = new FrequencyResult((char)i, raw[i], raw[i+26]);
		return res;
	}

	public static void main(String[] arg) {
		try {
			FrequencyAnalyzer fa = new FrequencyAnalyzer("histoire.txt");
			FrequencyResult[] data = fa.compute();
			Arrays.sort(data, Collections.reverseOrder());
			for (FrequencyResult fr: data)
				System.out.println(fr);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	static class FrequencyResult implements Comparable<FrequencyResult> {
		public final int upper;
		public final int lower;
		public final char letter;

		public FrequencyResult(int id, int ctU, int ctL) {
			upper = ctU;
			lower = ctL;
			letter = (char)(id+'A');
		}

		public String toString() {
			return Character.toString(letter)+";"+upper+";"+lower;
		}

		public int compareTo(FrequencyResult other) {
			int delta = upper+lower-(other.upper+other.lower);
			if (delta < 0)
				return -1;
			else if (delta > 0)
				return 1;
			else
				return 0;
		}
	}
}
